import { defHttp } from '/@/utils/http/axios';
import { getMenuListResultModel } from './model/menuModel';

enum Api {
  GetMenuList = '/getMenuList',
  GetAllmenu="/menu/list",
  createMenu="/menu/create",
  updateMenu="/menu/update",
}

/**
 * @description: Get user menu based on id
 */

export const getMenuList = () => {
  return defHttp.get<getMenuListResultModel>({ url: Api.GetMenuList });
};
export const GetAllmenu = () => {
  return defHttp.get({ url: Api.GetAllmenu });
};
export const createMenu = (data) => {
  return defHttp.post({ url: Api.createMenu ,data});
};
export const updateMenu = (data) => {
  return defHttp.post({ url: Api.updateMenu ,data});
};
